When voltages are connected such that the positive terminal of one battery is wired to the negative terminal of the next battery, the total voltage change is simply the sum of the individual voltage changes.
If one of the batteries is connected such that its positive terminal is wired to the preceding positive terminal and its negative terminal is wired to the following negative terminal, its voltage is subtracted from the total instead of being added to it.
A set of batteries with identical voltage connected such that all of the negative terminals are at the same potential and all of the positive terminals are at the same potential yield a net voltage equivalent to the voltage given by one of the batteries. In other words,